axios.defaults.baseURL = 'http://118.31.249.72:3000/'
    /**
     * get方法，对应get请求
     * @param {String} url [请求的url地址]
     * @param {Object} params [请求时携带的参数]
     */
function myget(url, params) {
    return new Promise((resolve, reject) => {
        axios.get(url, {
            params: params
        }).then(res => {
            console.log('myget方法调用成功')
            resolve(res);
        }).catch(err => {
            console.log('myget方法调用失败')
            reject(err)
        })
    });
}
/**
 * put方法，对应put请求
 * @param {String} url [请求的url地址]
 * @param {Object} params [请求时携带的参数]
 */
function myput(url, params) {
    return new Promise((resolve, reject) => {
        axios.put(url, params).then(res => {
            console.log('myput方法调用成功')
            resolve(res);
        }).catch(err => {
            console.log('myput方法调用失败')
            reject(err)
        })
    });
}
/**
 * post方法，对应post请求
 * @param {String} url [请求的url地址]
 * @param {Object} params [请求时携带的参数]
 */
function mypost(url, params) {
    return new Promise((resolve, reject) => {
        axios.post(url, params)
            .then(res => {
                console.log('mypost方法调用成功')
                resolve(res);
            })
            .catch(err => {
                console.log('mypostpost方法调用失败')
                reject(err)
            })
    });
}